chore(react-devtools): pin agent-react-devtools 0.5.0 for React Native 0.87+ - #2488
Conversation
…e React Native 0.87 setup step agent-react-devtools 0.5.0 restores attachment on React Native 0.87+, where the built-in DevTools websocket was removed (react/react-native#56897). The app now needs a one-time `agent-react-devtools init` plus a rebundle; the help topic says so, and warns that an empty observation is not a pass. Verified live: a bare react-native@0.87.1 app attaches through `agent-device react-devtools` with 149 components. Refs #2430
|
Size Report
Startup median (7 runs, lower is better):
|
|
The pin is appropriate, but the new help needs two corrections. React Native setup also requires agent-react-devtools as an app dependency: init writes Metro and entry imports, while this wrapper’s npm exec package is temporary and does not install it into the app. Document that prerequisite before init and rebundling. The claim that observation commands fail with no attached app is not true of the pinned 0.5.0 release; that fix is in the later upstream #59. Until it is released and pinned, tell users to verify an attached app rather than relying on errors or an empty result. The iOS smoke failure is RUNNER_BUSY at the WebView page wait, also failing on unrelated PRs. It appears unrelated to this pin. |
|
Both corrections applied in the help topic: the app must have agent-react-devtools as a dev dependency before init, since the npm exec package here is temporary; and agents are told to verify an attached app with status or wait --connected first, because on 0.5.0 count, errors, and get tree return empty results with 0 apps connected. |
|
The corrected help at d14189a now covers the app dependency, init/rebundle and attachment check required by the pinned release. No code findings; the reported React Native 0.87 run covers the attachment change. The 57 kB size increase compares against newer main packaging that strips Apple-runner comments, rather than showing growth from this pin. Refresh the branch onto that packaging change and rerun the affected and Size checks before merge; ready for human review. |
|
The iOS smoke job has now completed: it fails with RUNNER_BUSY while waiting for the WebView page link, matching the separately reported main failure. This appears unrelated to the DevTools pin; the code verdict and ready-for-human label are unchanged. |
Summary
Pins
agent-react-devtoolsto 0.5.0, which restores React DevTools attachment on React Native 0.87+ (callstackincubator/agent-react-devtools#58). React Native 0.87 removed the built-in DevTools websocket (facebook/react-native#56897), soreact-devtools wait --connectedcould never succeed on those apps.The
help react-devtoolstopic now states the one-timeagent-react-devtools initrequirement (Metro wrapper plus an entry import, then rebundle) and that an empty observation with 0 apps connected is not a pass.Verification
End to end on a bare
react-native@0.87.1app (community CLI template, Metro on 8081), driven throughagent-device react-devtoolswith this pin:init:wait --connected --timeout 15init:errorsNo components with errors or warnings, exit 0init+ reload:wait --connectedcount,errors,get treefind App --exactreturns 2errorsNo React app is attached ... app disconnected 3s ago, exit 1uninitindex.jsandmetro.config.jsThe help text in this PR tells agents to run
initanduninit, and not to read the first-column empty results as a pass. The right-hand column arrives with the next pin bump.cli-react-devtools,cli-help,cli-help-topics, andcommand-doc-coveragetests pass; lint and typecheck clean.Not in this PR
The vacuous pass from #2430 (
errorsexits 0 with nothing attached) is a daemon-side defect, fixed upstream in callstackincubator/agent-react-devtools#59, pending release. Another pin bump follows once it ships.Refs #2430
Expo upgrade attempted and dropped
Upgrading the test-app to a React Native 0.87 Expo SDK was tried in this branch so the scenarios could run on our own app. Latest stable SDK 57 ships 0.86.3, which still has the legacy DevTools websocket. SDK 58 preview ships 0.87.1 but does not build on Xcode 26.2 / Swift 6.2.3:
expo-modules-jsifails first on the constructor annotations tracked in expo/expo#49667, then on Swift 6sendingdata-race errors inJavaScriptRuntime.swiftunderNonisolatedNonsendingByDefault. The file is identical to Expo main, so this is a toolchain-versus-preview mismatch. The test-app stays on SDK 56 for now.